#ifndef NDT_BASE_VIEW_H
#define NDT_BASE_VIEW_H

// 所有扫描view的基类
#include <QGraphicsView>
#include "rulebar.h"
#include "view_core_def.h"

#define RULER_CNT 4

namespace eintik::presentation::viewcore {

class RulerManager;

class NdtScanView : public QGraphicsView
{
    Q_OBJECT
public:
    explicit NdtScanView(QWidget *parent = nullptr);

    RulerManager *getRulerManager();

    void setColorMap(const QVector<QColor> &colorVector, int32_t id = 2);

    VIEW_TYPE getViewType(void) const;
    void initView(int type);

signals:
    void signalMouseLongPress(const QPoint &pos);

protected:
    void resizeEvent(QResizeEvent *event) override;

private:
    void initSlot();
    void initView();
    void refreshRulerPosition(void);

protected:
    VIEW_TYPE m_Type;
    QString scanName;
    RotateType rotateType = RotateType::R0;
    RulerManager *rulerManager = nullptr;
    QWidget *fooWidget = nullptr;
};

}

#endif // NDT_BASE_VIEW_H
